package cn.joker.springmyselfjoker.demos.web.result;

/**
 * 请求状态码枚举类
 * @author 无
 * @since 2020
 * @version 1.0
 */
public enum ResultEnum {

    UNKNOWN_ERROR(-1, "未知错误"),
    SUCCESS(200, "正确"),
    FAIL(200, "失败"),
    REDIRECT(302, "重定向"),
    PARAM_ERROR(400, "参数错误"),
    PERM_ERROR(403, "权限错误"),
    NO_LOGIN(401, "用户未登录"),
    METHOD_ERROR(405, "方法不允许"),
    SYSTEM_ERROR(500, "系统错误"),
    TIMEOUT_ERROR(504, "请求超时"),
    THIRD_ACCOUNT_NO_BIND(90001, "用户未绑定"),
    THIRD_ACCOUNT_HUNAN_NO_BIND(90002, "湖南单点用户未绑定");

    private int code;

    private String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
